#include <reg52.h>
#include <..\XC51.h>



void main()
{
		if (key1 == 0){
			delay(50);
			if (key1 == 0){
				beep = 0;
				delay(1000);
				beep = 1;
				advance();
			}
		}
		if (key2 == 0){
			delay(50);
			if (key2 == 0){
				beep = 0;
				delay(1000);
				beep = 1;
				left_turn();
			}
		}
		if (key3 == 0){
			delay(50);
			if (key3 == 0){
				beep = 0;
				delay(1000);
				beep = 1;
				right_turn();
			}
		}
		if (key4 == 0){
			delay(50);
			if (key4 == 0){
				stop();
				beep = 0;
				delay(1000);
				beep = 1;
			}
			
		}
		
}